//
// Created by admin on 2022/1/5.
//

#ifndef LEETCODE_SEQUENCELIST_H
#define LEETCODE_SEQUENCELIST_H

/**
 * 顺序表
 */
template <class E>
class SequenceList {
private:
    int p_size;
    int p_capacity;
    E p_elements[];

    bool rangeCheck(int index);

public:
    explicit SequenceList(int capacity = 10);
    ~SequenceList();

//    void trimToSize();
//    void ensureCapacity(int minCapacity);
//    int size();
//    bool isEmpty();
//    int indexOf(E element);
//    int lastIndexOf(E element);
    E get(int index);
//    E set(int index, E element);
    bool add(E element);
//    void add(int index, E element);
//    E remove(int index);
//    bool remove(E element);
//    void clear();
//    SequenceList<E> subList(int fromIndex, int toIndex);

};


#endif //LEETCODE_SEQUENCELIST_H
